<!doctype html>


<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>cssom.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>





<div class="colmask rightmenu">
<div class="colleft">
    <div class="col1">
      <!-- Column 1 start -->

<div id="title">
       <span class="fn">cssom.js</span>
</div>

<div class="g-section g-tpl-75-25">
  <div class="g-unit g-first" id="description">
    CSS Object Model helper functions.
 References:
 - W3C: <a href="http://dev.w3.org/csswg/cssom/">http://dev.w3.org/csswg/cssom/</a>
 - MSDN: <a href="http://msdn.microsoft.com/en-us/library/ms531209(VS.85).aspx">http://msdn.microsoft.com/en-us/library/ms531209(VS.85).aspx</a>.
  </div>
  

        <div class="g-unit" id="useful-links">
          <div class="title">Useful links</div>
          <ol>
            <li><a href="closure_goog_cssom_cssom.js.source.html"><span class='source-code-link'>Source Code</span></a></li>
            <li><a href="http://code.google.com/p/closure-library/source/browse/closure/goog/cssom/cssom.js">Git</a></li>
          </ol>
        </div>
</div>

<h2 class="g-first">File Location</h2>
  <div class="g-section g-tpl-20-80">
    <div class="g-unit g-first">
      <div class="g-c-cell code-label">cssom/cssom.js</div>
    </div>
  </div>
<hr/>


   
<br/>

  <div class="legend">
        <span class="key publickey"></span><span>Public</span>
        <span class="key protectedkey"></span><span>Protected</span>
        <span class="key privatekey"></span><span>Private</span>
  </div>



<h2>Enumerations</h2>






<div class="section">
  <table class="horiz-rule">


  </table>
</div>




  <h2>Global Functions</h2>





<div class="section">
  <table class="horiz-rule">


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.addCssRule"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">addCssRule<span class="args">(<span class="arg">cssStyleSheet</span>,&nbsp;<span class="arg">cssText</span>,&nbsp;<span class="arg">opt_index</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Cross browser function to add a CSSRule into a CSSStyleSheet, optionally
at a given index.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssStyleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The CSSRule's parentStyleSheet.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">cssText</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The text for the new CSSRule.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_index</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The index of the cssRule in its parentStylesheet.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line290">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.addCssText"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">addCssText<span class="args">(<span class="arg">cssText</span>,&nbsp;<span class="arg">opt_domHelper</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Appends a DOM node to HEAD containing the css text that's passed in.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssText</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">CSS to add to the end of the document.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_domHelper</span>
        : <div class="fullType">(<span class="type"><a href="class_goog_dom_DomHelper.html">goog.dom.DomHelper</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">Optional DOM helper user for document interactions.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/DOM/Element">Element</a></span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            The newly created STYLE element.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line344">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getAllCssStyleRules"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getAllCssStyleRules<span class="args">(<span class="arg">opt_styleSheet</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">CSSStyleRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Recursively gets all CSSStyleRules, optionally starting from a given
CSSStyleSheet.
Note that this excludes any CSSImportRules, CSSMediaRules, etc..
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_styleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The CSSStyleSheet.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">CSSStyleRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            A list of CSSStyleRules.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line69">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getAllCssStyleSheets"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getAllCssStyleSheets<span class="args">(<span class="arg">opt_styleSheet</span>,&nbsp;<span class="arg">opt_includeDisabled</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Gets all CSSStyleSheet objects starting from some CSSStyleSheet. Note that we
want to return the sheets in the order of the cascade, therefore if we
encounter an import, we will splice that CSSStyleSheet object in front of
the CSSStyleSheet that contains it in the returned array of CSSStyleSheets.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_styleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">A CSSStyleSheet.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_includeDisabled</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">If true, includes disabled stylesheets, defaults to false.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            A list of CSSStyleSheet objects.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line117">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getAllCssText"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getAllCssText<span class="args">(<span class="arg">opt_styleSheet</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       Recursively gets all CSS as text, optionally starting from a given
CSSStyleSheet.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">opt_styleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The CSSStyleSheet.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            css text.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line56">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry private">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getAllCss_"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getAllCss_<span class="args">(<span class="arg">styleSheet</span>,&nbsp;<span class="arg">isTextOutput</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>)</div>
      </div>


     <div class="entryOverview">
       Recursively gets all CSS text or rules.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">styleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The CSSStyleSheet.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">isTextOutput</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Boolean">boolean</a></span></div>
        <div class="entryOverview">If true, output is cssText, otherwise cssRules.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></span>.&lt;(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)&gt;<span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>)</div>&nbsp;
            cssText or cssRules.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line395">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getCssRuleIndexInParentStyleSheet"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getCssRuleIndexInParentStyleSheet<span class="args">(<span class="arg">cssRule</span>,&nbsp;<span class="arg">opt_parentStyleSheet</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
      </div>


     <div class="entryOverview">
       Get the index of the CSSRule in it's CSSStyleSheet.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssRule</span>
        : <div class="fullType">(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">A CSSRule.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_parentStyleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">A reference to the stylesheet object this cssRule belongs to.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>&nbsp;
            The index of the CSSRule, or -1.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line204">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getCssRulesFromStyleSheet"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getCssRulesFromStyleSheet<span class="args">(<span class="arg">styleSheet</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type">CSSRuleList</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       Returns the CSSRules from a styleSheet.
Worth noting here is that IE and FF differ in terms of what they will return.
Firefox will return styleSheet.cssRules, which includes ImportRules and
anything which implements the CSSRules interface. IE returns simply a list of
CSSRules.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">styleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The CSSStyleSheet.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type">CSSRuleList</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            An array of CSSRules or null.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line88">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getCssTextFromCssRule"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getCssTextFromCssRule<span class="args">(<span class="arg">cssRule</span>)</span>
        </span>
        &#8658; <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
      </div>


     <div class="entryOverview">
       Gets the cssText from a CSSRule object cross-browserly.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssRule</span>
        : <div class="fullType">(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">A CSSRule.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>&nbsp;
            cssText The text for the rule, including the selector.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line174">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getFileNameFromStyleSheet"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getFileNameFromStyleSheet<span class="args">(<span class="arg">styleSheet</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>)</div>
      </div>


     <div class="entryOverview">
       Cross browser method to get the filename from the StyleSheet's href.
Explorer only returns the filename in the href, while other agents return
the full path.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">styleSheet</span>
        : <div class="fullType"><span class="type">StyleSheet</span></div>
        <div class="entryOverview">Any valid StyleSheet object with an href.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span>)</div>&nbsp;
            filename The filename, or null if not an external styleSheet.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line372">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.getParentStyleSheet"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">getParentStyleSheet<span class="args">(<span class="arg">cssRule</span>)</span>
        </span>
        &#8658; <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
      </div>


     <div class="entryOverview">
       We do some trickery in getAllCssStyleRules that hacks this in for IE.
If the cssRule object isn't coming from a result of that function call, this
method will return undefined in IE.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssRule</span>
        : <div class="fullType">(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The CSSRule.</div>
     </td>
   </tr>
  </table>
      </div>
   
      <div class="detailsSection">
        <b>Returns:</b>&nbsp;<div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>&nbsp;
            A styleSheet object.
      </div>
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line240">code &raquo;</a>
  </td>
     </tr>


     <tr class="odd entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.removeCssRule"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">removeCssRule<span class="args">(<span class="arg">cssStyleSheet</span>,&nbsp;<span class="arg">index</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Cross browser function to remove a CSSRule in a CSSStyleSheet at an index.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssStyleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">The CSSRule's parentStyleSheet.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">index</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span></div>
        <div class="entryOverview">The CSSRule's index in the parentStyleSheet.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line325">code &raquo;</a>
  </td>
     </tr>


     <tr class="even entry public">
       <td class="access"></td>






  <td>
    <a name="goog.cssom.replaceCssRule"></a>


     <div class="arg">
       <img align="left" src="static/images/blank.gif">

        <span class="entryNamespace">goog.cssom.</span><span class="entryName">replaceCssRule<span class="args">(<span class="arg">cssRule</span>,&nbsp;<span class="arg">cssText</span>,&nbsp;<span class="arg">opt_parentStyleSheet</span>,&nbsp;<span class="arg">opt_index</span>)</span>
        </span>
      </div>


     <div class="entryOverview">
       Replace a cssRule with some cssText for a new rule.
If the cssRule object is not one of objects returned by
getAllCssStyleRules, then you'll need to provide both the styleSheet and
possibly the index, since we can't infer them from the standard cssRule
object in IE. We do some trickery in getAllCssStyleRules to hack this in.
     </div>


    <! -- Method details -->
    <div class="entryDetails">

      <div class="detailsSection">
        <b>Arguments: </b>






<table class="horiz-rule">
     
   <tr class="even">
     <td>
        <span class="entryName">cssRule</span>
        : <div class="fullType">(<span class="type">CSSRule</span><span>&nbsp;|&nbsp;</span><span class="type">null</span>)</div>
        <div class="entryOverview">A CSSRule.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">cssText</span>
        : <div class="fullType"><span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/String">string</a></span></div>
        <div class="entryOverview">The text for the new CSSRule.</div>
     </td>
   </tr>
     
   <tr class="even">
     <td>
        <span class="entryName">opt_parentStyleSheet</span>
        : <div class="fullType">(<span class="type">CSSStyleSheet</span><span>&nbsp;|&nbsp;</span><span class="type">null</span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">A reference to the stylesheet object this cssRule belongs to.</div>
     </td>
   </tr>
     
   <tr class="odd">
     <td>
        <span class="entryName">opt_index</span>
        : <div class="fullType">(<span class="type"><a href="https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number">number</a></span><span>&nbsp;|&nbsp;</span><span class="type">undefined</span>)</div>
        <div class="entryOverview">The index of the cssRule in its parentStylesheet.</div>
     </td>
   </tr>
  </table>
      </div>
   
  
    </div>
   
  </td>


  <td class="view-code">
     <a href="closure_goog_cssom_cssom.js.source.html#line260">code &raquo;</a>
  </td>
     </tr>


  </table>
</div>






      <!-- Column 1 end -->
    </div>

        <div class="col2">
          <!-- Column 2 start -->
          <div class="col2-c">
            <h2 id="ref-head">Directory cssom</h2>
            <div id="localView"></div>
          </div>

          <div class="col2-c">
            <h2 id="ref-head">File Reference</h2>
            <div id="sideFileIndex" rootPath="" current="cssom/cssom.js"></div>
          </div>
          <!-- Column 2 end -->
        </div>
</div>
</div>

</body>
</html>
